package h3

import (
	"github.com/lucas-clemente/quic-go"
	"github.com/lucas-clemente/quic-go/quicvarint"
	"io"
)

const (
	ControlStreamType = 0x00
)

const (
	SettingFrameType = 0x4
	HeadersFrameType = 0x1
)

const (
	SettingEnableWebTransport = 0x2b603742
	SettingH3Datagram         = 0xffd277
)

// SkipUnknownFrame 跳过未知的Frame
func SkipUnknownFrame(stream quic.ReceiveStream) {
	reader := quicvarint.NewReader(stream)
	l, _ := quicvarint.Read(reader)
	_, _ = io.CopyN(io.Discard, stream, int64(l))
}
